// ======================================== Device ========================================
export const device_type = [
  { value: 1, label: "Other" },
  { value: 2, label: "Power" },
  { value: 3, label: "Server" },
  { value: 4, label: "Sensor" },
  { value: 5, label: "LED" },
  { value: 6, label: "Motor" }
];

export const device_type_map = new Map([
  [1, { text: "Other", value: 1 }],
  [2, { text: "Power", value: 2 }],
  [3, { text: "Server", value: 3 }],
  [4, { text: "Sensor", value: 4 }],
  [5, { text: "LED", value: 5 }],
  [6, { text: "Motor", value: 6 }]
]);

export const power_type = [
  { value: 0, label: "None" },
  { value: 1, label: "AC" },
  { value: 2, label: "DC" }
];

export const power_type_map = new Map([
  [0, { text: "None", value: 0 }],
  [1, { text: "AC", value: 1 }],
  [2, { text: "DC", value: 2 }]
]);

// ======================================== Topic ========================================
// 0-监听 1-发送 2-监听和发送
export const topic_type = [
  { value: 0, label: "Monitor" },
  { value: 1, label: "Send" },
  { value: 2, label: "Monitor and Send" }
];

export const topic_type_map = new Map([
  [0, { text: "Monitor", value: 0 }],
  [1, { text: "Send", value: 1 }],
  [2, { text: "Monitor and Send", value: 2 }]
]);
